package com.SpringBoot.SpringBoot.bean;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * @author:liuwei
 * @creatdate:2022-05-18-17:28
 */
@Component
@ConfigurationProperties(prefix = "mycar")
public class Car {
	private String name;
	private String price;

	public Car() {
	}

	public Car(String name, String price) {
		this.name = name;
		this.price = price;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getPrice() {
		return price;
	}

	public void setPrice(String price) {
		this.price = price;
	}

	@Override
	public String toString() {
		return "Car{" +
				"name='" + name + '\'' +
				", price='" + price + '\'' +
				'}';
	}
}
